William McNairn Shaw (1822 – December 30, 1868) was an Ontario lawyer and political figure. He represented Lanark South in the 1st Legislative Assembly of Ontario from 1867 to 1868 as a Conservative member.
He was born in Ramsay Township, Upper Canada in 1822, the son of John Shaw. Shaw studied law with Daniel McMartin at Perth. He died in Perth in 1868.
His brother Alexander Shaw later served in the Canadian House of Commons.